package world.liquor.domain;

public class CommonCode {
	private String commonCodeKey;
	private String commonCodeValue;
	private String commonExplanation;
	public CommonCode() {
	}
	public CommonCode(String commonCodeKey, String commonCodeValue,
			String commonExplanation) {
		this.commonCodeKey = commonCodeKey;
		this.commonCodeValue = commonCodeValue;
		this.commonExplanation = commonExplanation;
	}
	public String getCommonCodeKey() {
		return commonCodeKey;
	}
	public void setCommonCodeKey(String commonCodeKey) {
		this.commonCodeKey = commonCodeKey;
	}
	public String getCommonCodeValue() {
		return commonCodeValue;
	}
	public void setCommonCodeValue(String commonCodeValue) {
		this.commonCodeValue = commonCodeValue;
	}
	public String getCommonExplanation() {
		return commonExplanation;
	}
	public void setCommonExplanation(String commonExplanation) {
		this.commonExplanation = commonExplanation;
	}
	@Override
	public String toString() {
		return "commonCode [commonCodeKey=" + commonCodeKey
				+ ", commonCodeValue=" + commonCodeValue
				+ ", commonExplanation=" + commonExplanation + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((commonCodeKey == null) ? 0 : commonCodeKey.hashCode());
		result = prime * result
				+ ((commonCodeValue == null) ? 0 : commonCodeValue.hashCode());
		result = prime
				* result
				+ ((commonExplanation == null) ? 0 : commonExplanation
						.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CommonCode other = (CommonCode) obj;
		if (commonCodeKey == null) {
			if (other.commonCodeKey != null)
				return false;
		} else if (!commonCodeKey.equals(other.commonCodeKey))
			return false;
		if (commonCodeValue == null) {
			if (other.commonCodeValue != null)
				return false;
		} else if (!commonCodeValue.equals(other.commonCodeValue))
			return false;
		if (commonExplanation == null) {
			if (other.commonExplanation != null)
				return false;
		} else if (!commonExplanation.equals(other.commonExplanation))
			return false;
		return true;
	}
	
	
}
